'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.post('/user/register', controller.user.register);
  router.post('/user/login', controller.user.login);

  router.get('/user/checkusername', controller.user.checkUsername)
  router.put('/user/:id', controller.user.update)
  
  router.get('/user', controller.user.list)
  router.get('/user/:id',controller.user.findById)
};
